// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`A.js 1`] = `

/* @providesModule A */

module.exports = {};

var A = {x:true, ...{}};
module.exports.cls = A;

function f(x:boolean) { }
module.exports.fn = f;

A.y = "?";
A.x = A.y;
f(A.x); // A.x is now a string, by def assign
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule A */

module.exports = {};

var A = { x: true, ...{} };
module.exports.cls = A;

function f(x: boolean) {}
module.exports.fn = f;

A.y = "?";
A.x = A.y;
f(A.x); // A.x is now a string, by def assign

`;

exports[`B.js 1`] = `

/* @providesModule B */

var A = require('A').cls;

function B() {
  this.b = "...";
}

function f():number { return this.b; }

B.prototype.s = 0;
B.prototype.fn = f;

module.exports = B;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule B */

var A = require("A").cls;

function B() {
  this.b = "...";
}

function f(): number {
  return this.b;
}

B.prototype.s = 0;
B.prototype.fn = f;

module.exports = B;

`;

exports[`C.js 1`] = `

/* @providesModule C */

var B = require('B');
var f = require('A').fn;

function C() {
  var o = new B();
  f(o.b);
  f(o.s);
  o.fn();
}

module.exports = C;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule C */

var B = require("B");
var f = require("A").fn;

function C() {
  var o = new B();
  f(o.b);
  f(o.s);
  o.fn();
}

module.exports = C;

`;

exports[`D.js 1`] = `

/* @providesModule D */

var f = require('A').fn;

function g():string { return this.i; }

var o = {fn: g, ...{}};
o.i = true;

var i = o.fn();
f(i);

module.exports = "D for dummy";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule D */

var f = require("A").fn;

function g(): string {
  return this.i;
}

var o = { fn: g, ...{} };
o.i = true;

var i = o.fn();
f(i);

module.exports = "D for dummy";

`;

exports[`E.js 1`] = `

/* @providesModule E */

function h(x:number) { }
var proto = { fn: h }

var o = Object.create(proto);
o.fn(false);

module.exports = {obj: o};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule E */

function h(x: number) {}
var proto = { fn: h };

var o = Object.create(proto);
o.fn(false);

module.exports = { obj: o };

`;

exports[`F.js 1`] = `
function fn2(x) { return x.length * 4; }
fn2({length: 'hi'});

function foo(x: Array<number>): string {
  return x.length;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function fn2(x) {
  return x.length * 4;
}
fn2({ length: "hi" });

function foo(x: Array<number>): string {
  return x.length;
}

`;

exports[`G.js 1`] = `
var a = { length: "duck" };
a.length = 123;
a.length();

var b = [ 123 ];
b.length = "duck";
b.length();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var a = { length: "duck" };
a.length = 123;
a.length();

var b = [123];
b.length = "duck";
b.length();

`;
